home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / machine / leprechn.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  980b  |  53 lines

  1. /***************************************************************************
  2.  
  3.   machine.c
  4.  
  5.   Functions to emulate general aspects of the machine (RAM, ROM, interrupts,
  6.   I/O ports)
  7.  
  8. ***************************************************************************/
  9.  
  10. #include "driver.h"
  11.  
  12. static int input_port_select;
  13.  
  14. WRITE_HANDLER( leprechn_input_port_select_w )
  15. {
  16.     input_port_select = data;
  17. }
  18.  
  19.  
  20. READ_HANDLER( leprechn_input_port_r )
  21. {
  22.     switch (input_port_select)
  23.     {
  24.     case 0x01:
  25.         return input_port_0_r(0);
  26.     case 0x02:
  27.         return input_port_2_r(0);
  28.     case 0x04:
  29.         return input_port_3_r(0);
  30.     case 0x08:
  31.         return input_port_1_r(0);
  32.     case 0x40:
  33.         return input_port_5_r(0);
  34.     case 0x80:
  35.         return input_port_4_r(0);
  36.     }
  37.  
  38.     return 0xff;
  39. }
  40.  
  41.  
  42. READ_HANDLER( leprechn_200d_r )
  43. {
  44.     // Maybe a VSYNC line?
  45.     return 0x02;
  46. }
  47.  
  48.  
  49. READ_HANDLER( leprechn_0805_r )
  50. {
  51.     return 0xc0;
  52. }
  53.